package com.hushui.mall.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hushui.common.to.mq.SeckillOrderTo;
import com.hushui.common.utils.PageUtils;
import com.hushui.common.utils.R;
import com.hushui.mall.order.entity.OrderEntity;
import com.hushui.mall.order.entity.OrderItemEntity;
import com.hushui.mall.order.vo.*;
import com.hushui.mall.orderApi.dto.OrderItemDto;

import java.util.Map;
import java.util.concurrent.ExecutionException;

/**
 * 订单
 *
 * @author hwh
 * @email sunlightcs@gmail.com
 * @date 2023-03-15 16:39:41
 */
public interface OrderService extends IService<OrderEntity> {

    PageUtils queryPage(Map<String, Object> params);
    /**
     * 订单确认页返回需要用的数据
     * @return
     */
    OrderConfirmVo confirmOrder(Map<String, Object> params) throws ExecutionException, InterruptedException;
    /**
     * 创建订单
     * @param vo
     * @return
     */
    SubmitOrderResponseVo submitOrder(OrderSubmitVo vo);


    void closeOrder(OrderEntity order);

    PayVo getOrderPay(String orderSn);

    PageUtils queryPageWithItem(Map<String, Object> params);

    void creatSeckillOrder(SeckillOrderTo orderTo);

    R getFare(Long addrId);

    String handlePayResult(PayAsyncVo asyncVo);

    OrderEntity getOrderByOrderSn(String orderSn);
}

